﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using VoL.Domain.Infrastructure;
using VoL.Domain.IRepositories;
using VoL.Domain.IServices.BasicData.Partial;
using VOL.Entity.DomainModels;

namespace VoL.Domain.Services.BasicData.Partial
{
    public class NursingUnitWardServices: INursingUnitWardServices
    {
        IBaseRepository<VOL.Entity.DomainModels.NursingUnitWard> nursingRep;

        public NursingUnitWardServices(IBaseRepository<VOL.Entity.DomainModels.NursingUnitWard> nursingRep)
        {
            this.nursingRep = nursingRep;
        }
        /// <summary>
        /// 获取护理单元病房分配
        /// </summary>
        /// <returns></returns>
        public List<NursingUnitWard> GetNursingUnitWard()
        {
            return nursingRep.GetAll().ToList();
        }
        /// <summary>
        /// 添加护理单元病房分配
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public async Task<int> CreateNursingUnitWard(VOL.Entity.DomainModels.NursingUnitWard list)
        {
            int a = await nursingRep.Add(list);
            return a;
        }
    }                                 
}
